file-chooser: don't use an special label for recent
authorWilliam Jon McCann <william.jon.mccann@gmail.com>
Wed, 9 Apr 2014 15:50:42 +0000 (11:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 23 Apr 2014 02:35:00 +0000 (22:35 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=722211

gtk/gtkfilechooserwidget.c
gtk/resources/ui/gtkfilechooserwidget.ui

index 7f922fbad656e120b34c8ccddbf772ce8a5cde57..32d68882d06fdffb37cbec88c3384f1e31f14c17 100644 (file)
@@ -218,8 +218,6 @@ struct _GtkFileChooserWidgetPrivate {
   GtkWidget *browse_path_bar_hbox;
   GtkSizeGroup *browse_path_bar_size_group;
   GtkWidget *browse_path_bar;
-  GtkWidget *browse_special_mode_icon;
-  GtkWidget *browse_special_mode_label;
   GtkWidget *browse_select_a_folder_info_bar;
   GtkWidget *browse_select_a_folder_label;
   GtkWidget *browse_select_a_folder_icon;
@@ -2165,8 +2163,7 @@ typedef enum {
   PATH_BAR_FOLDER_PATH,
   PATH_BAR_SELECT_A_FOLDER,
   PATH_BAR_ERROR_NO_FILENAME,
-  PATH_BAR_ERROR_NO_FOLDER,
-  PATH_BAR_RECENTLY_USED
+  PATH_BAR_ERROR_NO_FOLDER
 } PathBarMode;
 
 /* Sets the info bar to show the appropriate informational or warning message */
@@ -2223,12 +2220,9 @@ path_bar_set_mode (GtkFileChooserWidget *impl, PathBarMode mode)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
   gboolean path_bar_visible            = FALSE;
-  gboolean special_mode_widgets_visible = FALSE;
   gboolean info_bar_visible            = FALSE;
   gboolean create_folder_visible        = FALSE;
 
-  char *tmp;
-
   switch (mode)
     {
     case PATH_BAR_FOLDER_PATH:
@@ -2242,23 +2236,11 @@ path_bar_set_mode (GtkFileChooserWidget *impl, PathBarMode mode)
       info_bar_visible = TRUE;
       break;
 
-    case PATH_BAR_RECENTLY_USED:
-      gtk_image_set_from_icon_name (GTK_IMAGE (priv->browse_special_mode_icon), "document-open-recent", GTK_ICON_SIZE_BUTTON);
-
-      tmp = g_strdup_printf ("<b>%s</b>", _("Recently Used"));
-      gtk_label_set_markup (GTK_LABEL (priv->browse_special_mode_label), tmp);
-      g_free (tmp);
-
-      special_mode_widgets_visible = TRUE;
-      break;
-
     default:
       g_assert_not_reached ();
     }
 
   gtk_widget_set_visible (priv->browse_path_bar,                       path_bar_visible);
-  gtk_widget_set_visible (priv->browse_special_mode_icon,              special_mode_widgets_visible);
-  gtk_widget_set_visible (priv->browse_special_mode_label,             special_mode_widgets_visible);
   gtk_widget_set_visible (priv->browse_select_a_folder_info_bar,       info_bar_visible);
 
   if (path_bar_visible)
@@ -2471,7 +2453,7 @@ path_bar_update (GtkFileChooserWidget *impl)
            mode = PATH_BAR_SELECT_A_FOLDER;
        }
       else
-       mode = PATH_BAR_RECENTLY_USED;
+       mode = PATH_BAR_FOLDER_PATH;
 
       break;
 
@@ -7439,8 +7421,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_hbox);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_size_group);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar);
-  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_special_mode_icon);
-  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_special_mode_label);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_select_a_folder_info_bar);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_select_a_folder_label);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_select_a_folder_icon);
index 3d15bb940554899659254e59b9a72a09743c7814..4c394f9bc47dc21a2e32f3a36122001bcce07bda 100644 (file)
                                 <property name="position">2</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkImage" id="browse_special_mode_icon">
-                                <property name="can_focus">False</property>
-                                <property name="icon_name">image-missing</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="browse_special_mode_label">
-                                <property name="can_focus">False</property>
-                                <property name="label">special</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">4</property>
-                              </packing>
-                            </child>
                             <child>
                               <object class="GtkButton" id="browse_new_folder_button">
                                 <property name="label" translatable="yes">Create Fo_lder</property>